/*
 *
 * Copyright (C) 2012 Walter Lütgenau
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package offset.nodes.server.search.controller;

import javax.servlet.http.HttpServletRequest;
import offset.nodes.Constants;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author Walter Lütgenau
 */
public class SearchForm extends ActionForm {
    private String path;
    private String query;
    
    private String type = TYPE_FULL_TEXT;
    public static final String TYPE_FULL_TEXT = "fullText";
    public static final String TYPE_XPATH = Constants.PARVALUE_XPATH;
    public static final String TYPE_SQL = "sql";
    
  /** Creates a new instance of NavigationForm */
    public SearchForm() {
    }

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }

    public String getQueryType() {
        return type;
    }

    public void setQueryType(String type) {
        this.type = type;
    }
    
      public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }  
    
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        this.query = null;
    }
    
}
